import random
class ran:
    @staticmethod
    def randInt(digit):
        '''
        :param digit: 设置多少位的随机数
        :return:
        '''
        if digit==1:
            return random.randint(1,9)
        if digit==2:
            return random.randint(10, 99)
        if digit==3:
            return random.randint(100,999)
        if digit==4:
            return random.randint(1000, 9999)
        if digit==5:
            return random.randint(10000, 99999)
        if digit==6:
            return random.randint(100000, 999999)

    @staticmethod
    def randStr(num):
        '''
        :param num: 设置多少位的随机字符
        :return:
        '''
        strH = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ54512154321321231212312111221122112abcdefghijklmnopqrstuvwxyz0123456789'
        Str = ""
        for i in range(1,num+1):
            Str+=random.choice(strH)
        return Str

